<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form action="/update5.do" onsubmit="return validateForm()">
  请输入要修改的ID：
  <input type=“text” name="id"><br>
  请输入新的属性名称：
  <input type="text" name="name"><br>
    <input type="submit" value="添加" style="display: inline-block;"class="btn btn-primary">
  </div>
</form>
</body>
<script>
    function validateForm() {
        var id = document.getElementsByName("id")[0].value;
        var name = document.getElementsByName("name")[0].value;

        if (id.trim() === "" || name.trim() === "") {
            alert("请填写完整信息");
            return false;
        }

        return true;
    }
</script>
</html>